set WORKSPACE=..

set LUBAN_DLL=%WORKSPACE%\Thirdparty\LubanTool\Luban\Luban.dll
set CONF_ROOT=%WORKSPACE%\Excel
set POSTPROCESS=%WORKSPACE%\Thirdparty\LubanTool\post_process.py
set GEN_DIR=%WORKSPACE%\Game\data


dotnet %LUBAN_DLL% ^
    -t all ^
    -c gdscript-json ^
    -d json  ^
    --conf %CONF_ROOT%\luban.conf ^
    -x outputCodeDir=%GEN_DIR%\_raw_gen ^
    -x outputDataDir=%GEN_DIR%\json && (
        mkdir "%GEN_DIR%\gen"
        python %POSTPROCESS% "%GEN_DIR%\_raw_gen\schema.gd" "%GEN_DIR%\gen"
    ) && echo "ignore this">"%GEN_DIR%\_raw_gen\".gdignore

pause